home *** CD-ROM | disk | FTP | other *** search
/ Windows 6-Pak - Disc 5 / Windows 6-Pak (InfoMagic) (Disc 5) (1999).ISO / Scripting-Tools / js15full.exe / Animat.ht_ / Animat.ht
Encoding:
Text File  |  1998-04-02  |  1.9 KB  |  65 lines

  1. <html>
  2.  
  3. <head><script language="JavaScript">
  4.  
  5. <!-- Hide the script from old browsers --
  6.  
  7. //======================================================
  8. // Java Script code by Java Script It!   www.computan.on.ca/~todd/JavaScriptIt!
  9. //======================================================
  10. var cell=-1;
  11. var bnumb = navigator.appVersion;
  12. var rel = bnumb.substring( 0 , 2 );
  13. var bname = navigator.appName;
  14. bgood=0;
  15.  
  16. test ()
  17.  
  18. function test ( ) {
  19. if ((parseInt( rel ) >= 3.0 && bname=="Netscape") || (parseInt( rel ) >= 4.0 && bname=="Microsoft Internet Explorer"))load ( )
  20. }
  21.  
  22. function load ( ) {
  23.         bgood=1;
  24. aImage= new Array (3)aTime= new Array (3)for (i=0; i<4; i++) {aImage[i] = new Image ()}aImage[0].src = "js-iconw.gif"aImage[1].src = "js-iconb90.gif"aImage[2].src = "js-iconw180.gif"aImage[3].src = "js-iconb270.gif"aTime[0]= 1000aTime[1]= 500aTime[2]= 500aTime[3]= 500ani ();}var cnt= 3;var i=0function ani () {
  25.     cell=cell+1;
  26.     if (cell==0) setTimeout ("ani ()",aTime[cell]);
  27.     else if (cell >0 && cell <= cnt) {
  28.         document.images[i].src=aImage[cell].src;
  29.         setTimeout ("ani ()",aTime[cell]);
  30.         }
  31.     else if (cell >cnt) {
  32.         document.images[i].src=aImage[0].src;
  33.         cell=-1;
  34.         ani ();
  35.     }
  36. }
  37.  
  38. //end hide-->
  39.  
  40. </script>
  41.  
  42. <title>Animation</title>
  43. </head>
  44.  
  45. <body bgColor="#FFFFFF" text="000000">
  46.  
  47. <div align=center><font size=6 font="Arial"><b>Animation</b></font></div><p>
  48.  
  49. Below is an example of a cell animation (a very basic one) that Java Script It! can perform.<p>
  50.  
  51. <img alt="Java Script It!" align=middle src="js-iconw.gif" border=0><p>
  52.  
  53. <b>Browser Compatibility</b><br>
  54. ò Works in Netscape Navigator 3.0 but some bugs are present<br>
  55. ò Works fully in Netscape Navigator 4.0 and higher<br>
  56. ò Does not work in Microsoft Internet Explorer 3.xx<br>
  57. ò Works fully in Microsoft Internet Explorer 4.0 and higher<br>
  58. ò No errors should occur in browsers that do not understand the Animation code
  59.  
  60. </body>
  61.  
  62. </html>
  63.  
  64.  
  65.